package com.kebabeaters.nakebab.client.gin;

import com.gwtplatform.mvp.client.gin.AbstractPresenterModule;
import com.gwtplatform.mvp.client.gin.DefaultModule;
import com.kebabeaters.nakebab.client.place.ClientPlaceManager;
import com.kebabeaters.nakebab.client.place.DefaultPlace;
import com.kebabeaters.nakebab.client.place.NameTokens;
import com.kebabeaters.nakebab.client.presenter.AddRestaurantPresenter;
import com.kebabeaters.nakebab.client.presenter.ContentPresenter;
import com.kebabeaters.nakebab.client.presenter.HelloWorldPresenter;
import com.kebabeaters.nakebab.client.presenter.KebabRankingPresenter;
import com.kebabeaters.nakebab.client.presenter.RestaurantDetailsPresenter;
import com.kebabeaters.nakebab.client.presenter.widget.CircleLayoutPresenterWidget;
import com.kebabeaters.nakebab.client.ui.view.AddRestaurantView;
import com.kebabeaters.nakebab.client.ui.view.ContentView;
import com.kebabeaters.nakebab.client.ui.view.HelloWorldView;
import com.kebabeaters.nakebab.client.ui.view.KebabRankingView;
import com.kebabeaters.nakebab.client.ui.view.RestaurantDetailsView;
import com.kebabeaters.nakebab.client.ui.view.TasterKebabRankingView;
import com.kebabeaters.nakebab.client.ui.view.widget.CircleLayoutViewWidget;
import com.kebabeaters.nakebab.client.presenter.TasterKebabRankingPresenter;

public class ClientModule extends AbstractPresenterModule {

	@Override
	protected void configure() {
		install(new DefaultModule(ClientPlaceManager.class));

		bindConstant().annotatedWith(DefaultPlace.class).to(
				NameTokens.tasterKebabRanking);

		bindPresenter(HelloWorldPresenter.class,
				HelloWorldPresenter.Display.class, HelloWorldView.class,
				HelloWorldPresenter.Proxy.class);

		bindPresenterWidget(CircleLayoutPresenterWidget.class,
				CircleLayoutPresenterWidget.Display.class,
				CircleLayoutViewWidget.class);
		
		bindPresenter(ContentPresenter.class, ContentPresenter.Display.class,
				ContentView.class, ContentPresenter.IProxy.class);

		bindPresenter(KebabRankingPresenter.class,
				KebabRankingPresenter.MyView.class, KebabRankingView.class,
				KebabRankingPresenter.MyProxy.class);
		
		bindPresenter(AddRestaurantPresenter.class, AddRestaurantPresenter.Display.class,
				AddRestaurantView.class, AddRestaurantPresenter.Proxy.class);

		bindPresenter(TasterKebabRankingPresenter.class,
				TasterKebabRankingPresenter.MyView.class,
				TasterKebabRankingView.class,
				TasterKebabRankingPresenter.MyProxy.class);

		bindPresenter(RestaurantDetailsPresenter.class,
				RestaurantDetailsPresenter.MyView.class,
				RestaurantDetailsView.class,
				RestaurantDetailsPresenter.MyProxy.class);
	}
}
